package com.nuanshui.heatedloan.web.search;

import com.alibaba.dubbo.config.annotation.Reference;
import com.google.common.collect.Maps;
import com.nuanshui.heatedloan.baseservice.facade.ProvinceService;
import com.nuanshui.heatedloan.constant.GlobalParam;
import com.nuanshui.heatedloan.web.ApiController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: Gonzo
 * @Date 2017/3/28下午2:31
 * @since 1.4.2
 */
@RequestMapping("/cms/manage/search/")
@RestController
public class SearchController extends ApiController{

    @Reference(url = GlobalParam.BASESERVICE_DUBBO_SERVER, timeout = GlobalParam.DUBBO_SERVER_TIME_OUT,version = GlobalParam.BASESERVICE_DUBBO_SERVER_VERSION)
    private ProvinceService provinceService;

    @RequestMapping("province/listAllprovince")
    public String listAllprovince(){
        Map<String, Object> map = Maps.newHashMap();
        map.put("list", provinceService.listAllProvince());
        return success(map);
    }

}
